<!DOCTYPE html>
<html>
<head>
    <title>{$work.title}</title>
    <meta name="keywords" content="{$site_info.site_seo_keywords|default=''}"/>
    <meta name="description" content="{$site_info.site_seo_description|default=''}">
    <include file="public@head"/>
    <style>
        #article_content img {
            height: auto !important;
            max-width: 100%;
        }

        #article_content {
            word-wrap: break-word;
        }
    </style>
</head>
<body class="body-white">
<include file="public@nav"/>
<div class="container tc-main">
    <div class="row">
        <div class="col-md-9">
            <div class="tc-box article-box">
                <h2>{$work.title}</h2>
                <div class="article-infobox">
                    <span>{$work.create_time} by {$work.user_nickname|default=''}</span>
                </div>
                <hr>

                <div id="article_content">
                    {:htmlspecialchars_decode($work.description)}
                </div>
            </div>
            <div>
                <table class="table table-striped">
                    <tr>
                        <th>相册</th>
                        <td>
                            <ul id="photos" class="pic-list list-unstyled form-inline">
                                <notempty name="work.more.photos">
                                    <foreach name="work.more.photos" item="vo">
                                        <php>$img_url=cmf_get_image_preview_url($vo['url']);</php>
                                        <li id="saved-image{$key}" style="margin: 5px">
                                            <span>{$vo.name|default=''}</span>
<!--                                            <input class="form-control" id="photo-{$key}-name" type="text"-->
<!--                                                   name="photo_names[]"-->
<!--                                                   value="{$vo.name|default=''}" style="width: 200px;" title="图片名称">-->
                                            <img id="photo-{$key}-preview"
                                                 src="{:cmf_get_image_preview_url($vo['url'])}"
                                                 style="height:36px;width: 36px;"
                                                 onclick="parent.imagePreviewDialog(this.src);">
                                        </li>
                                    </foreach>
                                </notempty>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <th>附件</th>
                        <td>
                            <ul id="files" class="pic-list list-unstyled form-inline">
                                <notempty name="work.more.files">
                                    <foreach name="work.more.files" item="vo">
                                        <php>$file_url=cmf_get_file_download_url($vo['url']);</php>
                                        <li id="saved-file{$key}" style="margin: 5px">
                                            <span>{$vo.name}</span>
<!--                                            <input class="form-control" id="file-{$key}-name" type="text"-->
<!--                                                   name="file_names[]"-->
<!--                                                   value="{$vo.name}" style="width: 200px;" title="图片名称">-->
                                            <a id="file-{$key}-preview" href="{$file_url}" target="_blank">下载</a>
                                        </li>
                                    </foreach>
                                </notempty>
                            </ul>
                        </td>
                    </tr>
                    <tr>
                        <th>音频</th>
                        <td class="form-inline">
                            <span>{$work.more.audio|default=''}</span>
<!--                            <input id="file-audio" class="form-control" type="text" name="post[more][audio]"-->
<!--                                   value="{$work.more.audio|default=''}" placeholder="请上传音频文件" style="width: 200px;">-->
                            <notempty name="work.more.audio">
                                <a id="file-audio-preview" href="{:cmf_get_file_download_url($work.more.audio)}"
                                   target="_blank">下载</a>
                            </notempty>
                        </td>
                    </tr>
                    <tr>
                        <th>视频</th>
                        <td class="form-inline">
                            <span>{$work.more.video|default=''}</span>
<!--                            <input id="file-video" class="form-control" type="text" name="post[more][video]"-->
<!--                                   value="{$work.more.video|default=''}" placeholder="请上传视频文件" style="width: 200px;">-->
                            <notempty name="work.more.video">
                                <a id="file-video-preview" href="{:cmf_get_file_download_url($work.more.video)}"
                                   target="_blank">下载</a>
                            </notempty>
                        </td>
                    </tr>
                </table>
            </div>
            <hr/>
<!--            <div style="margin-top: 20px">-->
<!--                <h4>评分列表</h4>-->
<!--                <table class="table table-striped">-->
<!--                    <thead>-->
<!--                        <tr>-->
<!--                            <th>序号</th>-->
<!--                            <th>评委姓名</th>-->
<!--                            <th>分数</th>-->
<!--                        </tr>-->
<!--                    </thead>-->
<!--                    <tbody>-->
<!--                    <foreach name="scores" index="key" item="vo">-->
<!--                        <tr>-->
<!--                            <td>{$key}</td>-->
<!--                            <td>{$vo.review_name}</td>-->
<!--                            <td>{$vo.score}分</td>-->
<!--                        </tr>-->
<!--                    </foreach>-->
<!--                    </tbody>-->
<!--                </table>-->
<!--            </div>-->
        </div>

    </div>


</div>
<include file="public@footer"/>
<include file="public@scripts"/>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>